package com.java.comprehensive.design.building_modelling.builder_pattern.heima;

import lombok.NoArgsConstructor;

/**
 * 指挥者类
 */
@NoArgsConstructor
public class Director {
    private Builder mBuild;

    public Director(Builder builder) {
        this.mBuild = builder;
    }

    public Bike construct() {
        mBuild.BuildFrame();
        mBuild.BuildSeat();
        return mBuild.createBike();
    }

    public Builder getmBuild() {
        return mBuild;
    }

    public void setmBuild(Builder mBuild) {
        this.mBuild = mBuild;
    }
}
